import request from '@/utils/request'

// 获取所有权限点数据
export const getPermissionApi = () => request({
  url: '/sys/permission'
})

// 添加权限
export const addPmsApi = data => request({
  url: '/sys/permission',
  method: 'POST',
  data
})

// 删除权限
export const delPmsApi = id => request ({
  url: `/sys/permission/${id}`,
  method: 'DELETE'
})

// 获取权限详情
export const getPmsDetailApi = id => request ({
  url: `/sys/permission/${id}`
})

// 更新权限
export const editPmsApi = data => request ({
  url: `/sys/permission/${data.id}`,
  method: 'PUT',
  data
})
